_require       "../../../../basis.smi"

_require       "../../../compilerIRs/typedlambda/main/TypedLambda.ppg.smi"
_require local "../../../data/builtin/main/BuiltinTypes.smi"
_require local "../../../data/name/main/CodeLabel.smi"
_require       "../../../data/types/main/Types.ppg.smi"
_require local "../../../extensions/debug/main/Bug.smi"
_require local "../../../libs/env/main/IEnv.smi"
_require local "../../../libs/ids/main/LocalID.smi"
_require local "./EmitTypedLambda.smi"

structure SwitchCompile =
struct

  val compileStringSwitch
      : {switchExp : TypedLambda.tlexp,
         expTy : Types.ty,
         branches :
           {constant : string, exp : TypedLambda.tlexp} list,
         defaultExp : TypedLambda.tlexp,
         resultTy : Types.ty,
         loc : TypedLambda.loc}
        -> TypedLambda.tlexp

  val compileIntInfSwitch
      : {switchExp : TypedLambda.tlexp,
         expTy : Types.ty,
         branches :
           {constant : IntInf.int, exp : TypedLambda.tlexp} list,
         defaultExp : TypedLambda.tlexp,
         resultTy : Types.ty,
         loc : TypedLambda.loc}
        -> TypedLambda.tlexp

end
